#include "led.h"

idata uc temp_1 = 0x00;
idata uc temp_old_1 = 0xff;
void led_disp(unsigned char* ucled)
{
	uc temp;
	temp_1 = 0x00;
	temp_1 = (ucled[0]<<0) | (ucled[1]<<1) | (ucled[2]<<2) | (ucled[3]<<3) | 
			 (ucled[4]<<4) | (ucled[5]<<5) | (ucled[6]<<6) | (ucled[7]<<7);
	if(temp_1 != temp_old_1)
	{
		P0 = ~temp_1;
		temp = P2 & 0X1F;
		temp = temp | 0X80;
		P2 = temp;
		temp = P2 & 0X1F;
		P2 = temp;
		temp_old_1 = temp_1;
	}
}